import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../components/Home/HomeView.vue'
import Journalism from '../components/journalismPage/journalism.vue'
import journalismContent from '@/components/journalismContent/journalismAllContent.vue'
import forumList from '@/components/forumPage/forumHome/forumHome.vue'
import forumContent from '@/components/forumPage/forumContent/forumContent.vue'
import SearchPage from '@/components/SearchPage/SearchPage.vue'
import login from '@/components/User/login/login.vue'
import PersonalMessage from '@/components/User/PersonalPage/PersonalPage.vue'
import register from '@/components/User/register/register.vue'
import lost from '@/components/User/lost/lost.vue'
import SearchResult from '@/components/SearchResult/SearchResult.vue'
import SelectedStocks from "@/components/Selected Stocks/SelectedStocks.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      meta: {ishead:true}
    },
    {
      path: "/journalism",
      component: Journalism,
      meta: {ishead:true}
    },{
      path: "/journalismContent",
      component: journalismContent,
      meta: {ishead:true}
    },{
      path: "/forumList",
      component: forumList,
      meta: {ishead:true}
    },{
      path: "/forumContent",
      name: "forumContent",
      component: forumContent,
      meta: {ishead:true}
    },{
      path: "/stockDetail",
      component: SearchPage,
      meta: {ishead:true}
    },{
      path: '/login',
      component: login,
    },{
      path: "/PersonalMessage",
      component: PersonalMessage,
      meta: {ishead:true}
    },{
    path: "/register",
      component: register,
    },{
    path: "/lost",
      component: lost,
    },{
      path: "/SelectedStocks",
      component: SelectedStocks,
      meta: {ishead:true}
    },{
      path: "/SearchResult",
      component: SearchResult,
      meta: {ishead:true}
    }
  ],
})

export default router
